//
//  UserDefault.h
//  KKZ
//
//  Created by Bismarrck on 11-7-21.
//  Copyright 2011年 Tsinghua University. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>

#define USER_DEFAULT_NAME [[NSUserDefaults standardUserDefaults] valueForKey:@"user_name"]
#define USER_DEFAULT_PASS [[NSUserDefaults standardUserDefaults] valueForKey:@"user_pass"]
#define USER_DEFAULT_CITY [[NSUserDefaults standardUserDefaults] valueForKey:@"user_city"]
#define USER_DEFAULT_DISTRICT [[NSUserDefaults standardUserDefaults] valueForKey:@"user_dist"]
#define USER_DEFAULT_COMM_CIRCLE [[NSUserDefaults standardUserDefaults] valueForKey:@"user_circle"]
#define USER_DEFAULT_COMM_AREA [[NSUserDefaults standardUserDefaults] valueForKey:@"user_area"]

#define USER_DEFAULT_NAME_WRITE(name) [[NSUserDefaults standardUserDefaults] setValue:name forKey:@"user_name"]
#define USER_DEFAULT_PASS_WRITE(pass) [[NSUserDefaults standardUserDefaults] setValue:pass forKey:@"user_pass"]
#define USER_DEFAULT_CITY_WRITE(city) [[NSUserDefaults standardUserDefaults] setValue:city forKey:@"user_city"]
#define USER_DEFAULT_DISTRICT_WRITE(dist) [[NSUserDefaults standardUserDefaults] setValue:dist forKey:@"user_dist"]
#define USER_DEFAULT_COMM_CIRCLE_WRITE(circle) [[NSUserDefaults standardUserDefaults] setValue:circle forKey:@"user_circle"]
#define USER_DEFAULT_COMM_AREA_WRITE(area) [[NSUserDefaults standardUserDefaults] setValue:area forKey:@"user_area"]
